const getCouponList = require("./getCouponList/index");
const addCoupon = require("./addCoupon/index");
const getCouponDetail = require("./getCouponDetail/index");
const updateCoupon = require("./updateCoupon/index");
const deleteCoupon = require("./deleteCoupon/index");

// 云函数入口函数
exports.main = async (event, context) => {
    switch (event.type) {
        case "getCouponList":
            return await getCouponList.main(event, context);
        case "addCoupon":
            return await addCoupon.main(event, context);
        case "getCouponDetail":
            return await getCouponDetail.main(event, context);
        case "updateCoupon":
            return await updateCoupon.main(event, context);
        case "deleteCoupon":
            return await deleteCoupon.main(event, context);
    }
};